package com.zrrd.charStream;


import java.io.UnsupportedEncodingException;
import java.util.Arrays;

/**
 * @author WanJl
 * @version 1.0
 * @title Test01
 * @description
 * @create 2024/5/26
 */
public class Test01 {
    public static void main(String[] args) throws UnsupportedEncodingException {
        String a="啊";
        //编码
        byte[] bytes = a.getBytes("UTF-8");
        System.out.println(Arrays.toString(bytes));
        //FFFF FFFF FFFF FFB0
        //FFFF FFFF FFFF FFA1

        //解码
        String s = new String(bytes, "UTF-8");
        System.out.println(s);
    }
}
